import request from '@/utils/request'

// 查询客户管理列表
export function listClient(query) {
  return request({
    url: '/business/client/list',
    method: 'get',
    params: query
  })
}

// 查询客户管理详细
export function getClient(id) {
  return request({
    url: '/business/client/' + id,
    method: 'get'
  })
}

// 新增客户管理
export function addClient(data) {
  return request({
    url: '/business/client',
    method: 'post',
    data: data
  })
}

// 修改客户管理
export function updateClient(data) {
  return request({
    url: '/business/client',
    method: 'put',
    data: data
  })
}

// 删除客户管理
export function delClient(id) {
  return request({
    url: '/business/client/' + id,
    method: 'delete'
  })
}
// 客户-获取权限
export function getUsermenuTree(id) {
  return request({
    url: '/personnel/user/menuTree/' + id,
    method: 'get',
  })
}
// 客户-权限设置
export function permissionSettings(data) {
  return request({
    url: '/business/clientEmployer/menu',
    method: 'put',
    data: data
  })
}
// 查询客户集合
export function allList(query) {
  return request({
    url: '/business/client/getAllClient',
    method: 'get',
    params: query
  })
}
// 客户-雇主菜单权限
export function clientEmployerMenuTree(bizId) {
  return request({
    url: '/business/clientEmployer/menu/menuTree/' + bizId,
    method: 'get',
  })
}
// 校验名称
export function getOneEmployer(params) {
  return request({
    url: '/business/employer/getOneEmployer',
    method: 'get',
    params
  })
}